package com.interview.item.javabase.random;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Random;

/**
 * @Author:zxh
 * @Description: 获取随机数演示
 * @Date: 2020/3/25
 * @Modified By:
 */
public class RandomTest {
    private static Logger logger = LoggerFactory.getLogger(RandomTest.class);
    public static void main(String[] args) {
        int i = new Random().nextInt(34);
        logger.info("随机整数：{}",i);
        double random = Math.random();
        logger.info("随机小数：{}",random);

    }
}
